package com.jzqf.harmonydemo.ability.slice;

import com.jzqf.harmonydemo.ResourceTable;
import com.jzqf.harmonydemo.library.database.DatabaseManager;
import com.jzqf.harmonydemo.views.slice.ListContainerAbilitySlice;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

/**
 * MainAbility slice
 */
public class MainAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        initData();
    }

    private void initData() {
        //数据库初始化
        DatabaseManager.setAbilitySlice(this);
    }

    @Override
    public void onActive() {
        super.onActive();
//        present(new ListContainerAbilitySlice(), new Intent());
//        //结束当前页面
//        terminate();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
